package factions;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import main.Plugin;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.scheduler.BukkitRunnable;

public class Power implements ActionListener, Listener {
	private final Faction faction;
	private int power;

	public Power(Faction faction, int power, Plugin plugin) {
		this.faction = faction;
		this.power = power;
		Bukkit.getPluginManager().registerEvents(this, plugin);
	}

	@Override
	public void run() {
		if (player.isOnline() && power < 10) {
			power++;
		} else if (player.isOnline() == false) {
			player.getServer().getScheduler().cancelTask(this.getTaskId());
		}
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
	}

}
